home *** CD-ROM | disk | FTP | other *** search
/ Beginning Mac Programming / Beginning Mac Programming.bin / pc / Open Me for REALbasic 3 / REALbasic 3.2 / Made with REALbasic™ / Database / db Reports 2.3 / REALbasic Developers / Using These Objects
Encoding:
Text File  |  2000-11-18  |  1.2 KB  |  28 lines

  1. Use these objects to print existing reports previously created with db Reports from your program.  Drag objects to your project as necessary.
  2.  
  3. This will give you two public methods:
  4. PreviewReport(report as FolderItem, src as DB, where as String)
  5. PrintReport(report as FolderItem, src as DB, where as String)
  6.  
  7.  
  8.  
  9. report - the report file to preview or print.
  10. db Reports saves files as plain text files so you can included them as part of your report or save them to a database. When it is time to preview or print, simply create a temporary file with the contents of the report file or use an existing report file already on disk.
  11.  
  12. src - the data source.
  13. db Reports assumes you already have your database open. The DB class is a db Reports base class for databases. If you are not using a REALDatabase or Valentina database, then you use this default class.
  14.  
  15. where - limiting information.
  16. Any additional limitations on data will be added to those set with the report file.
  17.  
  18. Here is some sample code:
  19.  
  20. dim myDB as DB
  21. dim myREALDB as REALDB
  22. dim myvDB as ValentinaDB
  23.  
  24. myDB = new DB(myDatabase) // not REALDatabase
  25. myREALDB = new REALDB(myDatabase) // is a REALDatabase
  26. myvDB = new ValentinaDB(myvDatabase) // Valentina database
  27.  
  28. PreviewReport(reportItem, myDB,"")